package com.litong.view;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class PostData extends HttpServlet {
	public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
		PrintWriter out = response.getWriter();
		response.setContentType("text/html;charset=utf-8");
		
		out.println("<!DOCTYPE html><html><head><meta charset='utf-8'></head><body>");		
		out.println("<form action='registerController' method='post'><br/>");
		out.println("<input type='hidden' value='abc' name='hidden1'/>");
		out.println("username:<input type='text' name='username'/><br/>");	
		out.println("<input type='submit' value='submit'/>");
		out.println("</form>");		
		out.println("</body></html>");
	}
	
	public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
		this.doGet(request, response);
	}
}
